package xyz.naoyu.entity;

import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;

/**
 * @author yWieLoc
 * @date 2022/3/14 14:47
 */
public class Group extends EntityBase {

    // ID = 管理物同名

    private JSONObject userId;


    public Group() {
    }

    public Group(String id) {
        super(id);
        type = "group";
    }

    public JSONObject getUserId() {
        return userId;
    }

    public void setUserId(JSONObject userId) {
        this.userId = userId;
    }

    public void addUser(String Id,String auth) {
        userId.put(Id,auth);
    }






    /**
     * 删除用户
     * @param Id
     */
    public void delUser(String Id) {
        userId.remove(Id);
    }

    /**
     * 获得权限认证
     * @param Id    用户Id
     * @return  相应的权限标识
     */
    public String find(String Id) {
        return (String) userId.get(Id);
    }
}
